{include file='account/header.tpl'}
{include file='account/leftcol.tpl'}
<div id="left-area">
<div class="entry post clearfix width-for-all-img">
              <div class="breadcrumb">
            <span class="raquo"></span><a href="/">Главная</a>
           <span class="raquo"> &raquo; </span><a href="{geturl controller="account" action="index"}">Мой профиль</a>  
           <span class="raquo"> &raquo; </span><a href="{geturl route='zakazview'}">Заказ №{$zakaz->getId()} </a>  
    </div>
    <h1 class="category-title">Заказ</h1>
    <div class="row" >
            <label>Покупатель:</label>
         {$zakaz->user->login}
        </div>
        
        <div class="row" >
            <label>Продавец:</label>
            <a href="{getsuburl route="shop" name=$zakaz->shop->nameshop}">{$zakaz->shop->nameshop}</a>
        </div>
        
        <div class="row" >
            <label>Продукт:</label>
             <div class="tables">
                <div class="cart-info">
        <table>
        <thead>
          <tr>
            <td class="image">Фото</td>
            <td class="name">Наименование товара</td>
            <td class="model">Модель</td>
            <td class="quantity"><span title="Количество">Кол-во</span></td>
            <td class="price">Цена</td>
            <td class="total">Итого</td>
          </tr>
        </thead>
		<tbody>
                     {foreach from=$zakaz->product item=product name="kk"}   
               <tr id="item_{$product->getId()}">
            <td class="image"> 
                <a href="{getsuburl route='shopproduct' name=$zakaz->shop->nameshop action='item' id=$product->getId()}">
                    <img src="{$product->logo}" alt="{$product->name}" title="{$product->name}" width="49px"/>
                </a>
              </td>
            <td class="name"><a href="{getsuburl route='shopproduct' name=$zakaz->shop->nameshop action='item' id=$product->getId()}">{$product->name}</a>
                             
              </td>
            <td class="model">{$product->name} </td>
            <td class="quantity">{$zakaz->count[$smarty.foreach.kk.index]}
              </td>
            <td class="price">{$product->price} {$currency}</td>
            <td class="total">{$zakaz->priceproduct[$smarty.foreach.kk.index]} {$currency}</td>
          </tr>
		{/foreach}   
                  </tbody>
		
		</table>
                   <div class="cart-total">
    <table id="total">
            <tr>
        <td class="right"><b>Итого:</b></td>
        <td class="right">{$zakaz->price} {$currency}</td>
      </tr>
          </table>
        </div>
      </div>
      </div>
     
        
        <div class="row" >
            <label>Статус:</label>
            <select name="status" id="status" onchange="updatestatus({$zakaz->getId()},$(this).val())">
                <option value="active"   {if $zakaz->status == 'active'}selected=""{/if}>Активный</option>
                <option value="finished" {if $zakaz->status == 'finished'}selected=""{/if}>Завершеный</option>
                <option value="deviation" {if $zakaz->status == 'deviation'}selected=""{/if}>Отклоненый</option>
            </select>
      
        </div>
        
     
        
        
</div></div>
{include file="footer.tpl"}